<%@include file="/include/struts-tags.jsp" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<%@include file="/include/head.jsp" %>
<script>
function findItem(codigo){
    //opener.cleanAgtnForm();
    var form = opener.document.getElementById("recomendadorForm");
    form.cmd.value = "SeleccionarRecomendador";
    form.codigo.value = codigo;
    form.submit();
    self.close();
}
</script>
    <body>
        <br />
        <html:form action="/Recomendador">
            <html:hidden property="cmd" value="BuscarRecomendador" />
            <table class="form">
                <caption class="titleSeg">B&uacute;squeda de Recomendadores</caption>
                <tr class="campos">
                    <td class="label">Nombres:&nbsp;&nbsp;</td>
                    <td class="control"><html:text property="nombre" styleClass="tinput125" /></td>
                    <td width="50px"></td>
                    <td class="label">Apellidos:&nbsp;&nbsp;</td>
                    <td class="control"><html:text property="apellidos" styleClass="tinput125" /></td>
                </tr>
                <tr class="campos">
                    <td class="label">Departamento:&nbsp;&nbsp;</td>
                    <td class="control"><html:text property="departamento" styleClass="tinput125" /></td>
                    <td></td>
                    <td class="label">Municipio:&nbsp;&nbsp;</td>
                    <td class="control"><html:text property="municipio" styleClass="tinput125" /></td>
                </tr>
                <tr>
                    <td colspan="5" align="center">
                        <html:submit value="Buscar" />
                    </td>
                </tr>
            </table>
        </html:form>
        <hr />
        <br />
        <logic:present name="recomendadorData" scope="request">
            <display:table pagesize="10" name="recomendadorData" requestURI="" class="results" style="width:90%;" id="results">
                <display:column property="codRecomendador" title="" style="text-align:center;" decorator="com.uca.sisbec.decorators.BusquedaRecDecorator"  sortable="true"/>
                <display:column property="nombreCompleto" title="Nombre" sortable="true" />
                <%-- <display:column property="apellidos" title="Apellidos" sortable="true"/> --%>
                <display:column property="departamento" title="Departamento" sortable="true" />
                <display:column property="municipio" title="Municipio" sortable="true" />
            </display:table>
            <script>
                var table = document.getElementById("results");
                var rows = table.getElementsByTagName("tr");
                for (var i = 1; i < rows.length; i++) {
                        rows[i].onmouseover = function() {
                                this.className += ' hilite';
                        }
                        rows[i].onmouseout = function() {
                                this.className = this.className.replace(' hilite', '');
                        }
                }
            </script>
        </logic:present>
    </body>
</html>
